Reference cache memories are used to speed up the encoding process when encoding digital video data corresponding to a sequence of digital source images. The reference cache memory comprises at least a part of a reference image. If requested data is contained in the cache (cache hit), this request can be served by simply reading the cache, which is comparatively faster. Otherwise (cache miss), the data has to be recomputed or fetched from its original storage location, which is comparatively slower. Hence, the greater the number of requests that can be served from the cache, the faster the overall system performance becomes. To be cost efficient and to enable an efficient use of data, cache memories are relatively small in terms of memory size.
When using a reference cache memory data is transferred between the original storage location and the cache memory in blocks of data of fixed size, called cache lines, this is usually the smallest amount of data that can be read from the original storage location (typical external DRAM memory). When encoding images the blocks of data corresponds to blocks of pixels also called macro blocks. The data stored in the reference cache memory is hence stored in a structured order making it simple to fetch the image data in the cache memory.
Moreover, the reference cache memory, dedicated to be used when encoding digital video data, is having a cache width corresponding to a maximum source image width being storable in the cache memory.
When encoding digital video data the reference cache memory is arranged to store a preselected number of blocks or macro blocks lines of the reference image. This information is used by a motion estimation unit to find motion in between two frames of the digital video data. The number of blocks or macro blocks lines may vary from e.g. 3 block/macro block lines up to the block/macro block line count that is need for that particular application; a common value is 5 or 7. Moreover, the reference cache memory has to be large enough to store full lines of the blocks/macro blocks of the source image in order to function efficiently. For each new block/macro block line in the source image that will be compressed, the reference cache memory has to be read at least once to perform the motion search. When a source image block/macro block line has been finished the oldest block/macro block line in the reference cache memory may be free to use for a new block/macro block line further down in the reference image.
In order to optimally use the benefits of having a reference cache memory when encoding digital video data corresponding to a sequence of digital source images the source image width, measured in number of blocks of data, must be smaller or equal to the cache width also measured in number of blocks of data.
Thus, encoding source images having a comparatively large source image width, e.g. 4K UHDTV (2160p) (3840×2160 pixels, corresponding to 240×135 macro blocks) or 8K UHDTV (4320p) (7680×4320 pixels, corresponding to 480×270 macro blocks) requires a cache memory having a comparatively large cache width in order to use the cache memory optimally for fast encoding of the digital video data. However, video devices of today do not comprise cache memories of this size.
The cache width of a video encoding device typically follows the source image width of the video images that the video encoding device is encoding to ensure fast encoding of the digital video data. There is however a trend towards larger pixel counts of the source images both due to the fact that image sensors capturing source images have an increasing number of sensor pixels as well as the fact that source images may be composed of image data captured by several individual image sensors. In video encoding devices encoding large source images it may hence not be possible to have a cache memory matching the size of the source image for a number of reasons; large cache memory have relatively high power requirements and are complicated and hence expensive to fabricate, if they are available at all.
Hence, there is a need for optimal usage of existing reference cache memories for speeding up the encoding of comparatively large sized digital video data.